% TABLE 4



clear all;

B = dlmread('csweights.dat')
ii=B(:,1);
jj=B(:,2);
ss=B(:,3);
clear B;
E=sparse(ii,jj,ss,409,409);
clear ii; clear jj; clear ss;
A = dlmread('migration.dat');


% fixed effects spatial autocorrelation program written by: J.Paul Elhorst 9/2004
% University of Groningen
% Department of Economics
% 9700AV Groningen
% the Netherlands
% j.p.elhorst@eco.rug.nl
%
% dimensions of the problem
T=14; % number of time periods
N=409; % number of regions
nobs=N*T;
% row-normalize W
W=normw(E); % function of LeSage





% Table 4 - Column (5)
y=A(:,[14]); 
x=A(:,[5,18]); 
info.lflag=0;
info.model=3;
results=sem_panel(y,x,W,T,info);
vnames=strvcat('igrowth','hurr','initial');
prt_sp(results,vnames,1);


% Table 4 - Column (6)
y=A(:,[15]); 
x=A(:,[5,19]); 
info.lflag=0;
info.model=3;
results=sem_panel(y,x,W,T,info);
vnames=strvcat('ogrowth','hurr', 'initial');
prt_sp(results,vnames,1);







clear all;

B = dlmread('csweights.dat')
ii=B(:,1);
jj=B(:,2);
ss=B(:,3);
clear B;
E=sparse(ii,jj,ss,409,409);
clear ii; clear jj; clear ss;
A = dlmread('hurrpn.dat');



% University of Groningen
% Department of Economics
% 9700AV Groningen
% the Netherlands
% j.p.elhorst@eco.rug.nl
%
% dimensions of the problem
T=27; % number of time periods
N=409; % number of regions
nobs=N*T;
% row-normalize W
W=normw(E); % function of LeSage
y=A(:,[3]); % column number in the data matrix that corresponds to the dependent variable
x=A(:,[4,5]); % column numbers in the data matrix that correspond to the independent variables
xconstant=ones(nobs,1);

% Table 4 - Column (3)
info.lflag=0;
info.model=3;
results=sem_panel(y,x,W,T,info);
vnames=strvcat('growth','initial','hurr');
prt_sp(results,vnames,1);


% Table 4 - Column (4)
x=A(:,[4,5,8,9,11,12]);
info.lflag=0;
info.model=3;
results=sem_panel(y,x,W,T,info);
vnames=strvcat('growth','initial','hurr','irate', 'orate','iinter','ointer');
prt_sp(results,vnames,1);



% Table 4 - Column (7)
y=A(:,[13]); % column number in the data matrix that corresponds to the dependent variable
x=A(:,[14,5]);
info.lflag=0;
info.model=3;
results=sem_panel(y,x,W,T,info);
vnames=strvcat('growth','initial','hurr');
prt_sp(results,vnames,1);

clear all;

B = dlmread('csweights.dat')
ii=B(:,1);
jj=B(:,2);
ss=B(:,3);
clear B;
E=sparse(ii,jj,ss,409,409);
clear ii; clear jj; clear ss;
A = dlmread('hurrpn.dat');

% Dataset downloaded from www.wiley.co.uk/baltagi/
% Spatial weights matrix constructed by Elhorst
%
% written by: J.Paul Elhorst 9/2004
% University of Groningen
% Department of Economics
% 9700AV Groningen
% the Netherlands
% j.p.elhorst@eco.rug.nl
%
% dimensions of the problem
T=27; % number of time periods
N=409; % number of regions
nobs=N*T;
% row-normalize W
W=normw(E); % function of LeSage

% Table 4 - Column (1)
y=A(:,[9]); % column number in the data matrix that corresponds to the dependent variable
x=A(:,[5]); %
info.lflag=0;
info.model=3;
results=sem_panel(y,x,W,T,info);
vnames=strvcat('orate','hurr');
prt_sp(results,vnames,1);


% Table 4 - Column (2)
y=A(:,[8]); % column number in the data matrix that corresponds to the dependent variable
x=A(:,[5]); %
info.lflag=0;
info.model=3;
results=sem_panel(y,x,W,T,info);
vnames=strvcat('irate','hurr');
prt_sp(results,vnames,1);


